/*
Hermes Core: General Purpose Mobile Agent Platform
Copyright (C) 2006 UNICAM - Università degli Studi di Camerino

Group leaders: Flavio Corradini and Emanuela Merelli

Developers: Ezio Bartocci, Diego Bonura, Rosario Culmone,
Davide Lorenzoli, Leonardo Mariani, Francesca Piersigilli, 
Lorenzo Scortichini, Leonardo Vito.

GNU Lesser Public License

This library is free software; you can redistribute it 
and/or modify it under the terms of the GNU Lesser General 
Public License as published by the Free Software Foundation, 
version 2.1 of the License.

This library is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public 
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.

Emanuela Merelli
Dipartimento di Matematica ed Informatica
Università di Camerino
via Madonna delle Carceri, 62032 Camerino, Italy
E.Mail: emanuela.merelli@unicam.it
*/
package hermesV2.basicServices.monitoring;

import hermesV2.BasicServices;
import hermesV2.PlaceAddress;

import hermesV2.core.id.Identify;
import hermesV2.core.id.Trace;

import javax.swing.JFrame;


/**
 * DOCUMENT ME!
 *
 * @author $author$
 * @version $Revision: 1.1 $
 */
public class Monitor {
    /** DOCUMENT ME! */
    private Identify identify;
    /** DOCUMENT ME! */
    private Trace trace;
    /** DOCUMENT ME! */
    private BasicServices basicServices;
    /** DOCUMENT ME! */
    private PlaceAddress currentPlaceAddress;
    /**
     * DOCUMENT ME!
    */
    private String storePath;

    /**
     * Creates a new Monitor object.
     *
     * @param currentPlaceAddress DOCUMENT ME!
     * @param storePath DOCUMENT ME!
     */
    public Monitor(PlaceAddress currentPlaceAddress, String storePath) {
        this.currentPlaceAddress = currentPlaceAddress;
        this.storePath = storePath;
    }

    /**
     * DOCUMENT ME!
     *
     * @param identify DOCUMENT ME!
     */
    public void setIdentify(Identify identify) {
        this.identify = identify;
    }

    /**
     * DOCUMENT ME!
     *
     * @param trace DOCUMENT ME!
     */
    public void setTrace(Trace trace) {
        this.trace = trace;
    }

    /**
     * DOCUMENT ME!
     *
     * @param basicServices DOCUMENT ME!
     */
    public void setBasicServices(BasicServices basicServices) {
        this.basicServices = basicServices;
    }

    /**
     * DOCUMENT ME!
     */
    public void showGui() {
        JFrame.setDefaultLookAndFeelDecorated(true);

        JFrame hermesGUI = new HermesGUI(currentPlaceAddress, basicServices, identify, trace, storePath);
        hermesGUI.setVisible(true);
    }
}
